home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pinstaller / templates / amd64ArchitectureTemplate.py < prev    next >
Text File  |  2006-01-02  |  2KB  |  48 lines

  1. """
  2. # Copyright 1999-2005 Gentoo Foundation
  3. # This source code is distributed under the terms of version 2 of the GNU
  4. # General Public License as published by the Free Software Foundation, a copy
  5. # of which can be found in the main directory of this project.
  6. Gentoo Linux Installer
  7.  
  8. $Id: amd64ArchitectureTemplate.py,v 1.9 2006/01/02 22:56:24 agaffney Exp $
  9. Copyright 2004 Gentoo Technologies Inc.
  10.  
  11.  
  12. This fills in amd64 specific functions.
  13. """
  14.  
  15. import sys
  16. sys.path.append("../../templates")
  17. import GLIUtility, string
  18. #from GLIArchitectureTemplate import ArchitectureTemplate
  19. from x86ArchitectureTemplate import x86ArchitectureTemplate
  20. from GLIException import *
  21. import parted
  22.  
  23. class amd64ArchitectureTemplate(x86ArchitectureTemplate):
  24.     def __init__(self,configuration=None, install_profile=None, client_controller=None):
  25.         x86ArchitectureTemplate.__init__(self, configuration, install_profile, client_controller)
  26.         self._architecture_name = 'amd64'
  27.  
  28.     """
  29.     def install_bootloader(self):
  30.         "Installs and configures bootloader"
  31.         #
  32.         # THIS IS ARCHITECTURE DEPENDANT!!!
  33.         # This is the amd64 way.. it uses grub but must do it staticly.
  34.         
  35.         if self._install_profile.get_boot_loader_pkg():
  36.             exitstatus = self._portage.emerge(self._install_profile.get_boot_loader_pkg())
  37.         else:
  38.             pass
  39.         
  40.         if self._install_profile.get_boot_loader_pkg() == "grub":
  41.             self._install_grub()
  42.         else:
  43.             raise Exception("BootLoaderError",'fatal','install_bootloader',"Invalid bootloader selected:"+self._install_profile.get_boot_loader_pkg())
  44.     """
  45.  
  46.     def _configure_lilo(self):
  47.         raise Exception("BootLoaderError", "fatal", "_configure_lilo", "This function should *never* get called for amd64")
  48.